<?php if($is_loggedin === FALSE) : ?>
 <!-- Start Normal Menu -->
             <div class="navBar">
     <div class="logo_area">
        <a href="<?=site_url()?>" title="Home"><img src="<?=base_url('images/logo.png')?>" width="241" height="68" border="0" alt="Logo" /></a>
     </div>
        
       <div class="welcome_area_main">
                 <div class="Logout_text_write">
                    &nbsp;
                 </div>
                <div class="welcome_text_write">
                    Welcome Guest
                </div>
             </div>
        <div class="menubar_out_div">
           <div class="menu_nav">
                   <ul>
                      <li><a href="<?=site_url()?>">Home</a></li>
                      <li><a href="<?=site_url('buy-books')?>">Buy Books</a></li>
                      <li><a href="<?=site_url('sell-books')?>">Sell Books</a></li>
                      <li><a href="<?=site_url('contact-us')?>">Contact</a></li>
                   </ul>   
               <div class="login_text"><a  id="ns_login" href="#">Login</a></div>
            </div>
         </div>
     <div class="ezcart">
         <div class="curt_busket_img">
          <img src="<?=base_url('images/cart.icon.png')?>" width="16" height="15" border="0" alt="" />
         </div>
            <div id="header_cart_text" class="busket_text"><a href="<?=site_url('cart')?>">
				<?php
					$cartArr = $this->session->userdata('cartdata');
					$total_items_in_cart = (is_array($cartArr)) ? count($cartArr) : 0;
					print $total_items_in_cart . " item" . (($total_items_in_cart > 1) ? "s" : '');
				?>
			</a></div>
         <div class="checkout_btn_area">
          <a href="<?=site_url('cart/checkout')?>"><img src="<?=base_url('images/button_checkout.png')?>" width="95" height="23" border="0" alt="" /></a></div>
        </div>
    </div>
          <!-- Login box -->
             <div id="ns_box-login" class="login_form_div">
          <!-- start popup login box -->
            <FORM class="ns_form" method="post" action="<?=site_url('login')?>">
                     <div class="ns_field">
                        <LABEL class="hide" for="username">User email id:</LABEL> 
                        <INPUT id="ns_username" class="ns_inline_description" value="Username" maxlength="150" type="text" name="login_email"> 
                     </div>
                    <div class=ns_field>
                        <LABEL class="hide" for="passwd">Password:</LABEL>
                        <INPUT id="ns_passwd" class="ns_inline_description" value="Password" maxLength="150" type="password" name="login_password"> 
                        <a class="forgot_pass" href="<?=site_url('forgot')?>">Forgot?</a>
                    </div>
                    <div class="ns_field">
                        <div class="ns_remember" style="margin-bottom:10px;">
                           <div style="display:inline; float:left;">
                           <button class="ns_btn-small ns_blue ns_right ns_margin-none" type="submit" value="Login" name="loginSubmit">Login</button></div>
                               <div style="float:left; width:30px; margin-top:4px; font-size:16px; display:inline;">Or</div> 
                                 <div style="float:left; width:65px; margin-top:4px; display:inline;">
                                 <a href="#"><img src="<?=base_url('images/facebook_login.jpg')?>" width="65" height="22" border="0" alt="" /></a>
                                 </div> 
                        </div>
                    </div>
                        <div style="float:left; width:100%; display:inline;">
                          <INPUT id="loginpermanent" tabIndex="3" type="checkbox" name="savelogin">
                          <LABEL class="ns_inline" for="loginpermanent" style="margin-top:10px;">Stay signed in</LABEL> 
                        </div>
                     <div class="dont_have_account"><a href="<?=site_url('registration')?>">Don't have an account?</a></div>
                </FORM>
          <!-- end popup login box -->
       </div>
          <!-- Login box -->  
          <div class="clear"></div> 
          
<!-- End Normal Menu -->
<?php else: ?>

<!-- AFTER LOGIN MENU -->
         <div class="navBar">
             <div class="logo_area">
                 <img src="<?=base_url('images/logo.png')?>" width="241" height="68" border="0" alt=""/>
             </div>

             <div class="welcome_area_main">
                 <div class="Logout_text_write">
                    <a href="<?=site_url('logout')?>">Logout</a>
                 </div>
                <div class="welcome_text_write">
                    Welcome <?=$_SESSION['userinfo']['fullname'] ?>
                </div>
             </div>
              <? $this->load->view("includes/myaccount_menu");?>
             <div class="ezcart">
             <div class="curt_busket_img">
              <img src="<?=base_url('images/cart.icon.png')?>" width="16" height="15" border="0" alt="" />
             </div>
                <div id="header_cart_text" class="busket_text"><a href="<?=site_url('cart')?>">
					<?php
						$cartArr = $this->session->userdata('cartdata');
						$total_items_in_cart = (is_array($cartArr)) ? count($cartArr) : 0;
						print $total_items_in_cart . " item" . (($total_items_in_cart > 1) ? "s" : '');
					?>
				</a></div>
             <div class="checkout_btn_area">
              <a href="<?=site_url('cart/checkout')?>"><img src="<?=base_url('images/button_checkout.png')?>" width="95" height="23" border="0" alt="" /></a></div>
            </div>
         </div>  
<!-- END AFTER LOGIN MENU -->    
<?php endif; ?>